import request from '@/utils/request';
import constant from './constant';
export function login(username, password) {
  return request({
    url: constant.LOGIN,
    method: 'post',
    data: {
      username,
      password
    }
  });
}

export function getInfo(token) {
  return request({
    url: constant.USER_INFO,
    method: 'get',
    params: {token}
  });
}

export function logout() {
  return request({
    url: constant.LOGOUT,
    method: 'post'
  });
}
